﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DA;
using Businis;
namespace qlhocsinh
{
    public partial class Frmchitietdanhsachlop : Form
    {
        public Frmchitietdanhsachlop()
        {
            InitializeComponent();
        }

        DataLINQHocSinhDataContext dt = new DataLINQHocSinhDataContext();

        danhsachlop_BUS lhBUS = new danhsachlop_BUS();
        danhsachkhoi_BUS khoiBUS = new danhsachkhoi_BUS();
        giaovien_BUS gvBUS = new giaovien_BUS();
        danhsachhocsinh_BUS hsBUS = new danhsachhocsinh_BUS();

        LOP lh = new LOP();
        KHOI kh = new KHOI();
        GIANGVIEN gv = new GIANGVIEN();

        private void button1_Click(object sender, EventArgs e)
        {
            comboBox1.DataSource = lhBUS.laytheomk("K10");
            comboBox1.DisplayMember = "MALOP";
            comboBox1.ValueMember = "MALOP";
        }

        private void button2_Click_1(object sender, EventArgs e)
        {
            comboBox1.DataSource = lhBUS.laytheomk("K11");
            comboBox1.DisplayMember = "MALOP";
            comboBox1.ValueMember = "MALOP";
        }

        private void button3_Click_1(object sender, EventArgs e)
        {
            comboBox1.DataSource = lhBUS.laytheomk("K12");
            comboBox1.DisplayMember = "MALOP";
            comboBox1.ValueMember = "MALOP";
        }

        private void button4_Click(object sender, EventArgs e)
        {
            DialogResult a = MessageBox.Show("bạn có chắc chắn muốn thoát?", "thoát", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
            if (DialogResult.OK == a)
            {
                this.Close();
            }
        }

        private void comboBox1_SelectedIndexChanged_1(object sender, EventArgs e)
        {
            comboBox2.DataSource = lhBUS.laytheoml(comboBox1.Text);
            comboBox2.DisplayMember = "SISO";
            comboBox2.ValueMember = "SISO";

            dataGridView1.DataSource = hsBUS.laytheoml(comboBox1.Text);
        }

       

       
       
    }
}

